---@class Battle.BuffHPLowCondition:Battle.IBuffCondition
local t = Battle.CreateClass("BuffHPLowCondition",Battle.IBuffCondition)
Battle.BuffHPLowCondition = t

function t:ctor(buff,hpPer)
    ---@type Battle.Buffer
    self.buff = buff
    self.hpPer = hpPer/10000
    self.target = Battle.ActorManager.GetActor(self.buff.targetId)
    self.compare = Battle.CompareType.Less
end
function t:Check()
    if self.target:IsDead() then
        return
    end
    return Battle.BattleUtil.CheckCondition(self.target:GetHp()/self.target:GetHpMax(),self.compare,self.hpPer)
end
